//
//  ZHWindow.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/3/6.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class ZHWindow: NSWindow {
    
    override init(contentRect: NSRect, styleMask style: NSWindow.StyleMask, backing backingStoreType: NSWindow.BackingStoreType, defer flag: Bool) {
        
        super.init(contentRect: contentRect, styleMask: style, backing: backingStoreType, defer: flag)
        let subViews = self.contentView?.superview?.subviews
        for view in subViews! {
            if view.isKind(of:NSClassFromString("NSTitlebarContainerView")!) {
                view.removeFromSuperview()
            }
        }
    }
    
    override var canBecomeMain: Bool {
        return true
    }
    
    override var canBecomeKey: Bool {
        return true
    }
    
}
